﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.SharePoint;

namespace SiteProjects.Classes
{
   public static class SPExtensions
    {     
            /// <summary>
            /// check the item folder
            /// </summary>
            /// <param name="item"></param>
            /// <returns></returns>
            public static bool IsFolder(this SPListItem item)
            {
                return (item.Folder != null);
            }

            /// <summary>
            /// check the document library
            /// </summary>
            /// <param name="list"></param>
            /// <returns></returns>
            public static bool IsDocumentLibrary(this SPList list)
            {
                return (list.BaseType == SPBaseType.DocumentLibrary);
            }
      }

    
}
